<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>后台管理系统</title>
    <link rel="icon" href="/img/logo.png" type="image/x-icon"/>
    <link rel="stylesheet" href="/layui/css/layui.css">
    <script src="/script/jquery-3.3.1.min.js"></script>
    <script src="/script/wangEditor.js"></script>
    <script src="/layui/layui.js"></script>
    <script src="/script/admin/subject/update.js"></script>
    <script src="/script/admin/common.js"></script>
    <style type="text/css">
        .item-hide{
            display: none;
        }
    </style>
</head>
<body>
<input type="hidden" id="id" th:value="${subject.id}">
<input type="hidden" id="appIdList" th:value="${appIdList}">
    <form class="layui-form" id="form">
        <div class="layui-form-item">
            <label class="layui-form-label">标题:</label>
            <div class="layui-input-block layui-col-md5">
                <input type="text" name="title" lay-verify="required" th:value="${subject.title}" id="title" autocomplete="off"   class="layui-input">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">关键字</label>
            <div class="layui-input-block layui-col-md5">
                <input type="text" name="keyword" id="keyword" autocomplete="off" th:value="${subject.keywords}"  placeholder="请输入关键字"  class="layui-input">
            </div>
        </div>

        <div class="layui-col-md12" lay-verify="content" id="addEdit1" name="content" >
            <input type="hidden" id="content" th:value="${subject.content}">
        </div>

        <div class="layui-form-item" >
            <label class="layui-form-label">上传封面：</label>
            <div class="layui-input-block layui-col-md5">
                <button type="button" class="layui-btn" id="update_cover_btn">上传图片</button>
                <input type="hidden" id="cover_img" name="cover" lay-verify="cover" th:value="${subject.cover}">
                <div class="layui-upload-list">
                    <img class="layui-upload-img" id="demo1" th:src="${subject.cover}">
                    <p id="demoText"></p>
                </div>
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">是否推荐</label>
            <div class="layui-input-block layui-col-md5">
                <input type="radio" name="isCommented" value="1" title="是"  th:checked="${subject.isCommented == '1'}">
                <input type="radio" name="isCommented" value="0" title="否" th:checked="${subject.isCommented == '0'}">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">专题包含的app:</label>
            <div id="subjectAppList" class="demo-transfer layui-input-block layui-col-md8"></div>
        </div>

        <div class="layui-form-item layui-col-md-offset1" style="margin-bottom: 25px;">
            <div class="layui-btn" id="submit" lay-filter="form" lay-submit>提交</div>
        </div>


    </form>
</body>
</html>